import Vue from 'vue'
import Router from 'vue-router'
import routerResource from 'vue-resource'


import index from 'components/index/index'


import home from 'components/index/page/home/home'
import fenlei from 'components/index/page/fenlei/fenlei'
import gouwuche from 'components/index/page/gouwuche/gouwuche'
import shoucang from 'components/index/page/shoucang/shoucang'
import me from 'components/index/page/me/me'
import data from 'components/index/page/me/data/data'

import login from 'components/login/login'
import register from 'components/login/register/register'
import password from 'components/login/password/password'
import setPassWord from 'components/login/password/setPassWord/setPassWord'

import about from 'components/about/about'
import join from 'components/join/join'
import set from 'components/set/set'
import fuwutiaokuan from 'components/fuwutiaokuan/fuwutiaokuan'
import event from 'components/event/event'
import detail from 'components/detail/detail'



Vue.use(Router)
Vue.use(routerResource)

export default new Router({
  routes: [
    {
        path: '/index',
        component: index,
        // 配置子路由
        children:[
            {
              path:'home',
              component:home
            },
            {
              path:'fenlei',
              component:fenlei
            },
            {
              path:'gouwuche',
              component:gouwuche
            },
            {
              path:'shoucang',
              component:shoucang
            },
            {
              path:'me',
              component:me
            }
        ],
    linkActiveClass:'active'
    },{
        path: '/login',
        component: login
    },{
        path: '/about',
        component: about
    },{
        path: '/join',
        component: join
    },{
        path: '/set',
        component: set
    },{
        path: '/register',
        component: register
    },{
        path: '/fuwutiaokuan',
        component: fuwutiaokuan
    },{
        path: '/password',
        component: password
    },{
        path: '/setPassWord',
        component: setPassWord
    },{
        path: '/event',
        component: event
    },{
        path: '/data',
        component: data
    },{
        path: '/detail',
        component: detail
    }
  ],
  linkActiveClass:'active'
})
